﻿using GC_VKMD.MusicDownloader.Abstractions.Interfaces.Helpers;
using GC_VKMD.MusicDownloaderClient.Abstractions.Factories;
using GC_VKMD.MusicDownloaderClient.Abstractions.Interfaces.Factories.ViewModel;
using GC_VKMD.MusicDownloaderClient.Abstractions.Interfaces.Helpers;
using GC_VKMD.MusicDownloaderClient.Factories.ViewModel;

namespace GC_VKMD.MusicDownloaderClient.Factories
{
	public class WindowViewModelFactories : WindowViewModelBaseFactories
	{
		#region Variables

		private readonly IBrowserDialog _browserDialog;
		private readonly IApplicationConfiguration _applicationConfiguration;
		private readonly IVKMusicDownloader _vkMusicDownloader;

		#endregion

		#region Constructors

		public WindowViewModelFactories(IBrowserDialog browserDialog, IApplicationConfiguration applicationConfiguration,
			IVKMusicDownloader vkMusicDownloader)
		{
			_browserDialog = browserDialog;
			_applicationConfiguration = applicationConfiguration;
			_vkMusicDownloader = vkMusicDownloader;
		}

		#endregion

		#region Base Class Members

		public override IMusicDownloaderSettingsViewModelFactory CreateMusicDownloaderViewModelFactory()
		{
			return new MusicDownloaderSettingsViewModelFactory(_browserDialog, _applicationConfiguration);
		}

		public override IMusicDownloaderViewModelFactory CreateVKAutorizationViewModelFactory()
		{
			return new MusicDownloaderViewModelFactory(_applicationConfiguration, _vkMusicDownloader);
		}

		#endregion
	}
}
